﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EncaseMent.aspx.cs" Inherits="WMS6.Web.Outbound.EncaseMent"
    meta:resourcekey="Page" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>EncaseMent</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />

    <script src="../Js/jquery.js" type="text/javascript"></script>

    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>

    <script src="../Js/util.js" type="text/javascript"></script>

    <script src="../Js/InitPage.js" type="text/javascript"></script>

    <script src="../Js/checkbox.js" type="text/javascript"></script>

    <script src="../Js/Verification.js" type="text/javascript"></script>

    <script type="text/javascript">
        //初始化页面
        window.onload = function() {
            initEditNewPage();

        }
        function selectCarton() {
            var rtnValue = popModalWindow('../Configuration/CartonQuery.aspx?action=txtContainerType&type=CARTON_TYPE', 'dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if (rtnValue != null && rtnValue.toString() != "") {
                document.getElementById("txtContainerType").focus();
                document.getElementById("txtContainerType").value = rtnValue;
            }
        }
        //计算装箱数量是否大于 剩余数量 id装箱数量,id1已经装箱数量,id2剩余数量,id3拣货数量
        function InBoxQtyCount(id, id1, id2, id3) {
            if (document.getElementById(id).value != "" && document.getElementById(id).value != '0') {
                if (dataVer._Is123(document.getElementById(id), 'lblMsg')) {
                    //验证是否输入的是整数
                    var qty = document.getElementById(id).value; //装箱数量
                    var qty1 = parseInt(document.getElementById(id1).innerText, 10); //已经装箱数量
                    var qty2 = parseInt(document.getElementById(id2).innerText, 10); //剩余数量
                    var qty3 = parseInt(document.getElementById(id3).innerText, 10); //拣货数量
                    if (qty > qty1 + qty2) {
                        document.getElementById('lblMsg').style.display = '';
                        document.getElementById('lblMsg').innerText = '<%=GetGlobalMsgResource("F7600_001") %>';
                        //document.getElementById(id2).innerText = qty1;
                        document.getElementById(id).value = "";
                        document.getElementById(id).focus();
                    }
                    else {
                        document.getElementById('lblMsg').style.display = 'none';
                        // document.getElementById(id2).innerText =qty1+qty2 - qty;
                    }
                }
                else {
                    return false;
                }
            }
            else {
                document.getElementById(id1).innerText = document.getElementById(id1).innerText;
                document.getElementById('lblMsg').style.display = 'none';
            }
        }
    </script>

</head>
<body>
    <form id="F7064" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id="div_top">
            <table>
                <tr>
                    <td valign="bottom">
                        <asp:Label ID="lblAllocateRuleDetail" runat="server" CssClass="label_header" Text="容器"
                            meta:resourcekey="lblAllocateRuleDetail"></asp:Label>
                    </td>
                    <td>
                        <asp:Button ID="btnGoBack" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnGoBack%>"
                            AccessKey="c" ValidationGroup="aa" OnClick="btnGoBack_Click" Enabled="False" />
                    </td>
                    <td>
                        <asp:Button ID="btnSave" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnSave%>"
                            AccessKey="s" OnClick="btnSave_Click" Enabled="False" meta:resourcekey="btnSave" />
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <asp:Label ID="lblMsg" runat="server" CssClass="label_message" meta:resourcekey="lblMsg"></asp:Label>
        </div>
        <div id="div_menu">
            <div style="float: left; width: 8px;">
                <div class="tabL" id="divL1">
                </div>
            </div>
            <div style="float: left;" class="tabLabelCont tabCur" onclick="setTab('one',1,2)"
                id="divM1">
                <asp:Label ID="one1" CssClass="hover" runat="server" meta:resourcekey="one1">基本信息</asp:Label></div>
            <div style="float: left; margin-right: 2px;">
                <div class="tabR" id="divR1">
                </div>
            </div>
        </div>
        <div id="div_content">
            <div id="con_one_1" style="display: block; overflow-x: auto; overflow-y: hidden;">
                <table width="720" style="display: block; margin-left: 10px; margin-top: 10px;">
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblContainerID" runat="server" CssClass="label" Text="容器编号" meta:resourcekey="lblContainerID"></asp:Label><font
                                class="must_input">*</font>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblContainerType" runat="server" CssClass="label" Text="容器类型" meta:resourcekey="lblContainerType"></asp:Label><font
                                class="must_input">*</font>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblLength" runat="server" CssClass="label" Text="长" meta:resourcekey="lblLength"></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblTotalQty" runat="server" CssClass="label" Text="总数量" meta:resourcekey="lblTotalQty"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtContainerID" runat="server" CssClass="textbox" MaxLength="10"
                                meta:resourcekey="txtContainerID"></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtContainerType" runat="server" CssClass="textbox" meta:resourcekey="txtContainerType"></asp:TextBox><img
                                src="../Images/icon_find.gif" alt="select one item" id="imgContainerType" runat="server"
                                class="img" onclick="selectCarton();" />
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtLength" runat="server" CssClass="textbox" onblur="Javascript:dataVer._Is123OrX(this,'lblMsg')"
                                meta:resourcekey="txtLength"></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtTotalQty" runat="server" CssClass="textbox" Enabled="False" meta:resourcekey="txtTotalQty"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblBarcode" runat="server" CssClass="label" Text="货品条码" meta:resourcekey="lblBarcode"></asp:Label>
                            <td width="180px">
                                <asp:Label ID="lblSkuID" runat="server" CssClass="label" Text="货品代码" meta:resourcekey="lblSkuID"></asp:Label>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblWidth" runat="server" CssClass="label" Text="宽" onblur="Javascript:dataVer._Is123OrX(this,'lblMsg')"
                                    meta:resourcekey="lblWidth"></asp:Label>
                            </td>
                            <td width="180px">
                                <asp:Label ID="lblWeight" runat="server" CssClass="label" Text="重量" onblur="Javascript:dataVer._Is123OrX(this,'lblMsg')"
                                    meta:resourcekey="lblWeight"></asp:Label>
                            </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtBarcode" runat="server" CssClass="textbox" Enabled="False" meta:resourcekey="txtBarcode"></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtSkuID" runat="server" CssClass="textbox" Enabled="False" meta:resourcekey="txtSkuID"></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtWidth" runat="server" CssClass="textbox" meta:resourcekey="txtWidth"></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtWeight" runat="server" CssClass="textbox" meta:resourcekey="txtWeight"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblQty" runat="server" CssClass="label" Text="数量" meta:resourcekey="lblQty"></asp:Label>
                        </td>
                        <td width="180px">
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblHeight" runat="server" CssClass="label" Text="高" meta:resourcekey="lblHeight"></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblVolume" runat="server" CssClass="label" Text="体积" meta:resourcekey="lblVolume"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtQty" runat="server" CssClass="textbox" Enabled="False" meta:resourcekey="txtQty"></asp:TextBox>
                        </td>
                        <td width="180px">
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtHeight" runat="server" CssClass="textbox" onblur="Javascript:dataVer._Is123OrX(this,'lblMsg')"
                                meta:resourcekey="txtHeight"></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtVolume" runat="server" CssClass="textbox" onblur="Javascript:dataVer._Is123OrX(this,'lblMsg')"
                                meta:resourcekey="txtVolume"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            &nbsp;
                        </td>
                        <td width="180px">
                            &nbsp;
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblRemark" runat="server" CssClass="label" Text="备注" meta:resourcekey="lblRemark"></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblValue" runat="server" CssClass="label" Text="货值" meta:resourcekey="lblValue"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            &nbsp;
                        </td>
                        <td width="180px">
                            &nbsp;
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtRemark" runat="server" CssClass="textbox" meta:resourcekey="txtRemark"></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtValue" runat="server" CssClass="textbox" meta:resourcekey="txtValue"></asp:TextBox>
                        </td>
                    </tr>
                    <tr style="height: 20px;">
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td width="1000px" colspan="4">
                            <asp:GridView ID="gvdOrderDetail" runat="server" AutoGenerateColumns="False" CssClass="gridview"
                                Width="1000px" DataKeyNames="OwnerID" OnRowDataBound="gvdOrderDetail_RowDataBound"
                                meta:resourcekey="gvdOrderDetail">
                                <FooterStyle CssClass="GridViewFooterStyle" />
                                <RowStyle CssClass="GridViewRowStyle" />
                                <HeaderStyle CssClass="GridViewHeaderStyle" />
                                <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                <Columns>
                                    <asp:BoundField HeaderText="序号" FooterText="序号" meta:resourcekey="No">
                                        <ItemStyle CssClass="GridViewRowWidth_40" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="LineID" HeaderText="行号" FooterText="行号" meta:resourcekey="LineID">
                                        <ItemStyle CssClass="GridViewRowWidth_50" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="SkuID" HeaderText="货品代码" FooterText="货品代码" meta:resourcekey="SkuID">
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="" HeaderText="描述" FooterText="描述" meta:resourcekey="Descr">
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:BoundField>
                                    <asp:TemplateField FooterText="原始数量" HeaderText="原始数量" meta:resourcekey="OriginalQty">
                                        <ItemTemplate>
                                            <asp:Label ID="lblOriginalQty" runat="server" Text='<%# GetPreferenceDigit(Eval("OriginalQty").ToString()) %>'
                                                meta:resourcekey="lblOriginalQty"></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterText="拣货数量" HeaderText="拣货数量" meta:resourcekey="PickedQty">
                                        <ItemTemplate>
                                            <asp:Label ID="lblPickedQty" runat="server" Text='<%# GetPreferenceDigit(Eval("PickedQty").ToString()) %>'
                                                meta:resourcekey="lblPickedQty"></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterText="批号" HeaderText="批号" meta:resourcekey="Lot">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtLot" runat="server" Text='<%# Eval("Lot") %>' Width="100px" meta:resourcekey="txtLot"></asp:TextBox>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterText="装箱数量" HeaderText="装箱数量" meta:resourcekey="InBoxQty">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtInBoxQty" runat="server" Width="100px" meta:resourcekey="txtInBoxQty"></asp:TextBox>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterText="已装箱数量" HeaderText="已装箱数量" meta:resourcekey="EncasedQty">
                                        <ItemTemplate>
                                            <asp:Label ID="lblEncasedQty" runat="server" Text='<%# GetPreferenceDigit(Eval("EncasedQty").ToString()) %>'
                                                meta:resourcekey="lblEncasedQty"></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterText="剩余数量" HeaderText="剩余数量" meta:resourcekey="UnEncasedQty">
                                        <ItemTemplate>
                                            <asp:Label ID="lblUnEncasedQty" runat="server" Text='<%# GetPreferenceDigit(Eval("UnEncasedQty").ToString()) %>'
                                                meta:resourcekey="lblUnEncasedQty"></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="PackID" HeaderText="包装" FooterText="包装" meta:resourcekey="PackID">
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="UomID" HeaderText="单位" FooterText="单位" meta:resourcekey="UomID">
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:BoundField>
                                </Columns>
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr style="height: 30px;">
                        <td>
                        </td>
                    </tr>
                </table>
                <input id="hdnOwnerID" type="hidden" runat="server" />
                <input id="hdnFrom" runat="server" type="hidden" />
                <input id="hdnOrderID" runat="server" type="hidden" />
                <input id="hdnType" runat="server" type="hidden" value="0" />
            </div>
        </div>
    </div>
    </form>
</body>
</html>
